/**
 *
 **/
Ext.define('Image', {
	extend: 'Ext.data.Model',
	id: 'Image',
	fields: [
		{name:'src', type:'string'},
		{name:'caption', type:'string'}
	]
});
Ext.create('Ext.data.Store', {
	id: 'imagesStore',
	model: 'Image',
	data: [
		{src:'http://www.sencha.com/img/20110215-feat-drawing.png', caption:'Drawing & Charts'},
		{src:'http://www.sencha.com/img/20110215-feat-data.png', caption:'Advanced Data'},
		{src:'http://www.sencha.com/img/20110215-feat-html5.png', caption:'Overhauled Theme'},
		{src:'http://www.sencha.com/img/20110215-feat-perf.png', caption:'Performance Tuned'},
		{src:'http://www.sencha.com/img/20110215-feat-drawing.png', caption:'Drawing & Charts'},
		{src:'http://www.sencha.com/img/20110215-feat-data.png', caption:'Advanced Data'},
		{src:'http://www.sencha.com/img/20110215-feat-html5.png', caption:'Overhauled Theme'},
		{src:'http://www.sencha.com/img/20110215-feat-perf.png', caption:'Performance Tuned'},
		{src:'http://www.sencha.com/img/20110215-feat-drawing.png', caption:'Drawing & Charts'},
		{src:'http://www.sencha.com/img/20110215-feat-data.png', caption:'Advanced Data'},
		{src:'http://www.sencha.com/img/20110215-feat-html5.png', caption:'Overhauled Theme'},
		{src:'http://www.sencha.com/img/20110215-feat-perf.png', caption:'Performance Tuned'},
		{src:'http://www.sencha.com/img/20110215-feat-drawing.png', caption:'Drawing & Charts'},
		{src:'http://www.sencha.com/img/20110215-feat-data.png', caption:'Advanced Data'},
		{src:'http://www.sencha.com/img/20110215-feat-html5.png', caption:'Overhauled Theme'},
		{src:'http://www.sencha.com/img/20110215-feat-perf.png', caption:'Performance Tuned'},
		{src:'http://www.sencha.com/img/20110215-feat-drawing.png', caption:'Drawing & Charts'},
		{src:'http://www.sencha.com/img/20110215-feat-data.png', caption:'Advanced Data'},
		{src:'http://www.sencha.com/img/20110215-feat-html5.png', caption:'Overhauled Theme'},
		{src:'http://www.sencha.com/img/20110215-feat-perf.png', caption:'Performance Tuned'},
		{src:'http://www.sencha.com/img/20110215-feat-drawing.png', caption:'Drawing & Charts'},
		{src:'http://www.sencha.com/img/20110215-feat-data.png', caption:'Advanced Data'},
		{src:'http://www.sencha.com/img/20110215-feat-html5.png', caption:'Overhauled Theme'},
		{src:'http://www.sencha.com/img/20110215-feat-perf.png', caption:'Performance Tuned'}
	]
});

var imageTpl = new Ext.XTemplate(
	'<div class="holder">',
		'<tpl for=".">',
			'<div class="item-container" style="thumb-wrap">',
				'<img class="item-inner-holder" src="resources/images/task.jpg" />',
			'</div>',
		'</tpl>',
	'</div>'
);

Ext.define('TD.view.tasks.TasksView', {
	extend: 'Ext.view.View',
	
	alias : 'widget.tasksView',
	
	initComponent: function(obj){
		
	
		Ext.apply(this, {
		store: Ext.data.StoreManager.lookup('imagesStore'),
		renderTo: Ext.getBody(),
		tpl: imageTpl,
		itemSelector: 'div.thumb-wrap',
		emptyText: 'No images available'
	});
		
		this.callParent(obj);
	}
});